package com.yrd.centerlog;

import java.io.File;
import java.io.IOException;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.zeromq.ZMQ;

import com.yrd.common.webui.HttpEngine;


/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args ) throws Exception
    {
		File input = new File("config.xml");
		Document doc = Jsoup.parse(input, "UTF-8");
		Utils.printfln("读取配置文件");
		short webuiPort = Short.parseShort(doc.select("webui port").get(0).text());
		String zmqUrl = doc.select("zmq url").get(0).text();
		HttpEngine httpEngine = HttpEngine.create(webuiPort);
    	ListenEngine listenEngine = new ListenEngine(zmqUrl);
    	httpEngine.start();
    	listenEngine.start();
    }
}
